package org.demo.honor.integration.payment;

import org.demo.honor.integration.dto.PaymentDTO;
import org.demo.honor.integration.dto.PaymentOrderDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "payment-service", url = "${integration.feign.payment-service}")
public interface PaymentServiceFeignClient {

    @PostMapping("/api/payment")
    PaymentDTO createPayment(PaymentOrderDTO paymentOrderDTO);

    @GetMapping("/api/payment/{paymentId}")
    PaymentDTO queryPaymentStatus(@PathVariable("paymentId") String paymentId);


}
